Skip to content

Commit 993b203

Browse files
committed
Fix for build options to make a packageable binary.
1 parent 75cad59 commit 993b203

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ option(OPT_DEBUG "Sets debug compiler flags" OFF)
55
option(OPT_OPTIMIZE "Sets optimize compiler flags" ON)
66
option(OPT_PROFILE "Sets profile compiler flags" OFF)
77
option(OPT_USE_BOOST_THREAD "Uses boost thread instead of C++11 threads" OFF)
8-
option(OPT_SKIP_TESTS "Skip compiling the boost unittests" OFF)
9-
option(OPT_LINK_DEPS_STATICALLY "Links all dependencies (libpng, libjpeg, boost...) statically" OFF)
10-
option(OPT_LINK_BOOST_STATICALLY "Links boost statically" OFF)
8+
option(OPT_SKIP_TESTS "Skip compiling the boost unittests" ON)
9+
option(OPT_LINK_DEPS_STATICALLY "Links all dependencies (libpng, libjpeg, boost...) statically" ON)
10+
option(OPT_LINK_BOOST_STATICALLY "Links boost statically" ON)
1111
option(OPT_BOOST_STATIC "Links boost statically (deprecated, use OPT_LINK_BOOST_STATICALLY)" OFF)
1212
option(OPT_INSTALL_HEADERS "Installs libmapcraftercore header files" ON)
1313

src/mapcraftercore/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
INCLUDE(CheckCXXSourceCompiles)
2-
set(CMAKE_REQUIRED_FLAGS -std=c++0x)
2+
SET(CMAKE_REQUIRED_FLAGS -std=c++0x)
3+
4+
SET(CMAKE_MACOSX_RPATH TRUE)
5+
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
6+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
7+
SET(CMAKE_INSTALL_RPATH "abcd")
8+
SET(CMAKE_INSTALL_NAME_DIR "defg")
9+
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
10+
11+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
312
CHECK_CXX_SOURCE_COMPILES("int main() { void* p = nullptr; }" HAVE_NULLPTR)
413
CHECK_CXX_SOURCE_COMPILES("enum class Test { A=0, B=1, C=3 }; int main() { Test::A < Test::C; }" HAVE_ENUM_CLASS_COMPARISON)
514
CHECK_CXX_SOURCE_COMPILES("enum class Test; enum class Test { A, B }; int main() { Test::A == Test::B; }" HAVE_ENUM_CLASS_FORWARD_DECLARATION)

0 commit comments

Comments
 (0)