Commit 980abbae by Maarten L. Hekkelman

cmake file, working on Windows

parent 9914970c
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
include(FindPkgConfig)
# set the project name # set the project name
project(mkdssp VERSION 4.0.0) project(mkdssp VERSION 4.0.0)
...@@ -51,29 +49,28 @@ set (Boost_DETAILED_FAILURE_MSG ON) ...@@ -51,29 +49,28 @@ set (Boost_DETAILED_FAILURE_MSG ON)
find_package(Boost 1.73.0 REQUIRED COMPONENTS system iostreams regex date_time program_options) find_package(Boost 1.73.0 REQUIRED COMPONENTS system iostreams regex date_time program_options)
find_package(cifpp 1.0 REQUIRED)
set(CMAKE_THREAD_PREFER_PTHREAD) set(CMAKE_THREAD_PREFER_PTHREAD)
set(THREADS_PREFER_PTHREAD_FLAG) set(THREADS_PREFER_PTHREAD_FLAG)
find_package(Threads) find_package(Threads)
pkg_check_modules(LibcifPP libcifpp)
include_directories( include_directories(
${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src
PUBLIC ${cifpp_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
) )
add_executable(mkdssp ${PROJECT_SOURCE_DIR}/src/mkdssp.cpp) add_executable(mkdssp ${PROJECT_SOURCE_DIR}/src/mkdssp.cpp)
include_directories(${PROJECT_NAME} PUBLIC ${LibcifPP_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
install(TARGETS ${PROJECT_NAME} install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} RUNTIME DESTINATION ${BIN_INSTALL_DIR}
) )
target_link_libraries(${PROJECT_NAME} ${LibcifPP_LINK_LIBRARIES} ${Boost_LIBRARIES} z bz2 Threads::Threads) target_link_libraries(${PROJECT_NAME} CifPP::cifpp ${Boost_LIBRARIES} Threads::Threads)
if(MSVC) if(MSVC)
# make msvc standards compliant... # make msvc standards compliant...
target_compile_options(${PROJECT_NAME} PRIVATE /permissive-) target_compile_options(${PROJECT_NAME} PRIVATE /permissive-)
target_compile_options(unit-test PRIVATE /permissive-)
endif() endif()
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -133,6 +133,9 @@ ...@@ -133,6 +133,9 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="..\src\mkdssp.cpp" /> <ClCompile Include="..\src\mkdssp.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Object Include="..\mkdssp_rsrc.obj" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
......
...@@ -19,4 +19,9 @@ ...@@ -19,4 +19,9 @@
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Object Include="..\mkdssp_rsrc.obj">
<Filter>Source Files</Filter>
</Object>
</ItemGroup>
</Project> </Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment