11diff --git a/CMakeLists.txt b/CMakeLists.txt
2- index 96aefab..760b0f8 100644
2+ index 9511442..58a8a58 100644
33--- a/CMakeLists.txt
44+++ b/CMakeLists.txt
5- @@ -27 ,6 +27 ,10 @@ set(CPACK_PACKAGE_VERSION_PATCH "${SOPLEX_VERSION_PATCH}")
5+ @@ -31 ,6 +31 ,10 @@ set(CPACK_PACKAGE_VERSION_PATCH "${SOPLEX_VERSION_PATCH}")
66 set(CPACK_PACKAGE_VENDOR "Zuse Institute Berlin")
77 include(CPack)
88
@@ -13,7 +13,7 @@ index 96aefab..760b0f8 100644
1313 option(ZLIB "Use ZLIB" ON)
1414 option(GMP "Use GMP" ON)
1515 option(EMSCRIPTEN_HTML "Emscripten HTML output" OFF)
16- @@ -43 ,11 +47 ,17 @@ option(SANITIZE_THREAD "should the thread sanitizer be enabled in debug mode if
16+ @@ -44 ,11 +48 ,17 @@ option(SANITIZE "should sanitizers be enabled if available" OFF)
1717 option(COVERAGE "enable coverage support" OFF)
1818 option(PAPILO "should papilo library be linked" ON)
1919
@@ -34,12 +34,7 @@ index 96aefab..760b0f8 100644
3434
3535 # for colorized output
3636 if(NOT WIN32)
37- @@ -65,10 +75,12 @@ if(NOT CMAKE_BUILD_TYPE)
38- endif()
39-
40- # set the correct rpath for OS X
41- - set(CMAKE_MACOSX_RPATH ON)
42- + set(CMAKE_MACOSX_RPATH TRUE)
37+ @@ -70,6 +80,8 @@ set(CMAKE_MACOSX_RPATH ON)
4338
4439 # use C++14 standard
4540 set(CMAKE_CXX_STANDARD 14)
@@ -48,7 +43,7 @@ index 96aefab..760b0f8 100644
4843
4944 # set function visibility default to hidden
5045 set(CMAKE_CXX_VISIBILITY_PRESET hidden)
51- @@ -123 ,12 +135 ,11 @@ if(COVERAGE)
46+ @@ -124 ,12 +136 ,11 @@ if(COVERAGE)
5247 endif()
5348
5449 if(ZLIB)
@@ -66,7 +61,7 @@ index 96aefab..760b0f8 100644
6661 endif()
6762
6863 if(GMP)
69- @@ -170,39 +181 ,24 @@ else()
64+ @@ -171,42 +182 ,24 @@ else()
7065 set(SOPLEX_WITH_PAPILO off)
7166 endif()
7267
@@ -76,7 +71,6 @@ index 96aefab..760b0f8 100644
7671- find_package(Boost ${BOOST_MINIMUM_VERSION}) # PaPILO requires at least Boost 1.65 (on mac 1.72)
7772- if(Boost_FOUND)
7873- set(SOPLEX_WITH_BOOST on)
79- - include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
8074- if(NOT Boost_VERSION_MACRO)
8175- set(Boost_VERSION_MACRO ${Boost_VERSION})
8276- endif()
@@ -89,11 +83,15 @@ index 96aefab..760b0f8 100644
8983- Found Boost version is ${Boost_VERSION_STRING}.")
9084- endif()
9185- endif()
86+ - if(Boost_DIR)
87+ - message(STATUS "Found Boost: ${Boost_DIR}")
88+ - endif()
89+ - set(libs ${libs} Boost::boost)
9290- if(MPFR) # MPFR is used within boost multiprecision, so using it without Boost does not make sense
9391- find_package(MPFR)
9492- endif()
9593- if(MPFR_FOUND)
96- - message(STATUS "SoPlex with Boost MPFR libraries")
94+ - message(STATUS "SoPlex with Boost MPFR ${MPFR_VERSION} libraries")
9795- set(SOPLEX_WITH_MPFR on)
9896- include_directories(${MPFR_INCLUDE_DIRS})
9997- set(libs ${libs} ${MPFR_LIBRARIES})
@@ -123,7 +121,7 @@ index 96aefab..760b0f8 100644
123121 endif()
124122
125123 # disable fused floating point contraction to enhance reproducibility across compilers and architectures
126- @@ -244 ,7 +240 ,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/soplex/config.h.in ${PROJECT_BINA
124+ @@ -251 ,7 +244 ,7 @@ set(EXTRA_CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
127125 configure_file(${PROJECT_SOURCE_DIR}/soplex-config.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/soplex-config.cmake" @ONLY)
128126
129127 add_subdirectory(src)
@@ -136,18 +134,18 @@ index 96aefab..760b0f8 100644
136134+ add_subdirectory(check)
137135+ endif()
138136diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
139- index 16ffb17..b5a0b56 100644
137+ index d57c5fe..11f914a 100644
140138--- a/src/CMakeLists.txt
141139+++ b/src/CMakeLists.txt
142- @@ -193,25 +193,27 @@ target_link_libraries(libsoplexshared libsoplex ${libs})
140+ @@ -193,28 +193,32 @@ target_link_libraries(libsoplexshared libsoplex ${libs})
143141 set_target_properties(libsoplexshared PROPERTIES CXX_VISIBILITY_PRESET default)
144142
145143 # create soplex binary using library without pic
146144- add_executable(soplex soplexmain.cpp)
147- - target_link_libraries(soplex LINK_PUBLIC libsoplex ${Boost_LIBRARIES} )
145+ - target_link_libraries(soplex LINK_PUBLIC libsoplex)
148146+ if(SOPLEX_SOPLEX)
149- + add_executable(soplex EXCLUDE_FROM_ALL soplexmain.cpp)
150- + target_link_libraries(soplex PRIVATE libsoplex ${Boost_LIBRARIES} )
147+ + add_executable(soplex soplexmain.cpp)
148+ + target_link_libraries(soplex LINK_PUBLIC libsoplex)
151149
152150- if(EMSCRIPTEN AND EMSCRIPTEN_HTML)
153151+ if(EMSCRIPTEN AND EMSCRIPTEN_HTML)
@@ -159,40 +157,58 @@ index 16ffb17..b5a0b56 100644
159157+ # set the install rpath to the installed destination
160158+ set_target_properties(soplex PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
161159
162- - if(CMAKE_BUILD_TYPE EQUAL "Debug")
163- - find_package(Sanitizers)
164- - add_sanitizers(soplex)
165- + if(CMAKE_BUILD_TYPE EQUAL "Debug")
166- + find_package(Sanitizers)
167- + add_sanitizers(soplex)
168- + endif()
169- endif()
170-
171- add_executable(example EXCLUDE_FROM_ALL example.cpp)
172- target_link_libraries(example libsoplex)
160+ - if(SANITIZE)
161+ + if(SANITIZE)
162+ find_package(Sanitizers)
163+ add_sanitizers(libsoplex)
164+ add_sanitizers(libsoplex-pic)
165+ add_sanitizers(libsoplexshared)
166+ add_sanitizers(soplex)
167+ get_target_property(CONF_SANITIZE_FLAGS libsoplex SANITIZE_FLAGS)
168+ - endif(SANITIZE)
169+ -
170+ - add_executable(example EXCLUDE_FROM_ALL example.cpp)
171+ - target_link_libraries(example libsoplex)
172+ + endif(SANITIZE)
173+ + endif()
173174
174175- # set the install rpath to the installed destination
175176- set_target_properties(soplex PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
176- -
177+ + if(SOPLEX_EXAMPLE)
178+ + add_executable(example EXCLUDE_FROM_ALL example.cpp)
179+ + target_link_libraries(example libsoplex)
180+ + endif()
181+
177182 # install the header files of soplex
178183 install(FILES ${headers} ${PROJECT_BINARY_DIR}/soplex/config.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/soplex)
179- install(FILES soplex.h soplex.hpp soplex_interface.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
180- @@ -237,15 +239,23 @@ install(FILES
181- DESTINATION include/soplex/external/zstr)
184+ @@ -243,14 +247,23 @@ install(FILES
185+ install(FILES ${PROJECT_SOURCE_DIR}/src/soplex/external/zstr/License.txt DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/soplex/zstr)
182186
183187 # install the binary and the library to appropriate lcoations and add them to an export group
184188- install(TARGETS soplex libsoplex libsoplex-pic libsoplexshared EXPORT soplex-targets
185189+ if(SOPLEX_SOPLEX)
186- + install(TARGETS soplex
187- + EXPORT soplex-targets
190+ + install(TARGETS soplex EXPORT soplex-targets
188191+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
192+ +
193+ + if(MSVC)
194+ + install(FILES $<TARGET_PDB_FILE:soplex> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
195+ + endif()
189196+ endif()
190197+
191198+ install(TARGETS libsoplex libsoplex-pic libsoplexshared EXPORT soplex-targets
192- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
193- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
194- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
195- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
199+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
200+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
201+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
202+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
203+
204+ if(MSVC)
205+ - install(FILES $<TARGET_PDB_FILE:libsoplexshared> $<TARGET_PDB_FILE:soplex> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
206+ + install(FILES $<TARGET_PDB_FILE:libsoplexshared> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
207+ endif()
208+
209+ # install license files of soplex and fmt
210+ @@ -258,8 +271,10 @@ install(FILES ${PROJECT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}
211+ install(FILES ${PROJECT_SOURCE_DIR}/src/soplex/external/fmt/LICENSE.rst DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/soplex/fmt)
196212
197213 # Add library targets to the build-tree export set
198214- export(TARGETS libsoplex libsoplex-pic libsoplexshared
0 commit comments