summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-01-28 19:04:39 +0100
committerPetr Mrázek <peterix@gmail.com>2018-01-28 19:04:39 +0100
commit418251bd8668ea013caf3980281f75b625d41260 (patch)
tree2f44a761a5c4bf917e89a3efe92b3e22f7976ffb
parent0bcb24502e07e69fe201d7f122bc9f9d3b69ee07 (diff)
downloadMultiMC-418251bd8668ea013caf3980281f75b625d41260.tar
MultiMC-418251bd8668ea013caf3980281f75b625d41260.tar.gz
MultiMC-418251bd8668ea013caf3980281f75b625d41260.tar.lz
MultiMC-418251bd8668ea013caf3980281f75b625d41260.tar.xz
MultiMC-418251bd8668ea013caf3980281f75b625d41260.zip
NOISSUE use a variable for binary build definitions
-rw-r--r--CMakeLists.txt2
-rw-r--r--application/CMakeLists.txt3
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc5ef0b1..acfb7512 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -203,7 +203,7 @@ elseif(MultiMC_LAYOUT_REAL STREQUAL "lin-system")
set(LIBRARY_DEST_DIR ${MultiMC_LIBRARY_DEST_DIR})
MESSAGE(STATUS "Compiling for linux system with ${MultiMC_SHARE_DEST_DIR} and MULTIMC_LINUX_DATADIR")
- target_compile_definitions(MultiMC PRIVATE "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}" "-DMULTIMC_LINUX_DATADIR")
+ SET(MultiMC_APP_BINARY_DEFS "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}" "-DMULTIMC_LINUX_DATADIR")
# install as bundle with no dependencies included
set(INSTALL_BUNDLE "nodeps")
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index 37fc7a32..aa09efbb 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -266,6 +266,9 @@ endif()
if(DEFINED MultiMC_BINARY_RPATH)
SET_TARGET_PROPERTIES(MultiMC PROPERTIES INSTALL_RPATH "${MultiMC_BINARY_RPATH}")
endif()
+if(DEFINED MultiMC_APP_BINARY_DEFS)
+ target_compile_definitions(MultiMC PRIVATE ${MultiMC_APP_BINARY_DEFS})
+endif()
install(TARGETS MultiMC
BUNDLE DESTINATION ${BUNDLE_DEST_DIR} COMPONENT Runtime