Commit 980abbae by Maarten L. Hekkelman

cmake file, working on Windows

parent 9914970c
cmake_minimum_required(VERSION 3.10)
include(FindPkgConfig)
# set the project name
project(mkdssp VERSION 4.0.0)
......@@ -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(cifpp 1.0 REQUIRED)
set(CMAKE_THREAD_PREFER_PTHREAD)
set(THREADS_PREFER_PTHREAD_FLAG)
find_package(Threads)
pkg_check_modules(LibcifPP libcifpp)
include_directories(
${PROJECT_SOURCE_DIR}/src
PUBLIC ${cifpp_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
)
add_executable(mkdssp ${PROJECT_SOURCE_DIR}/src/mkdssp.cpp)
include_directories(${PROJECT_NAME} PUBLIC ${LibcifPP_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
install(TARGETS ${PROJECT_NAME}
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)
# make msvc standards compliant...
target_compile_options(${PROJECT_NAME} PRIVATE /permissive-)
target_compile_options(unit-test PRIVATE /permissive-)
endif()
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -133,6 +133,9 @@
<ItemGroup>
<ClCompile Include="..\src\mkdssp.cpp" />
</ItemGroup>
<ItemGroup>
<Object Include="..\mkdssp_rsrc.obj" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
......
......@@ -19,4 +19,9 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Object Include="..\mkdssp_rsrc.obj">
<Filter>Source Files</Filter>
</Object>
</ItemGroup>
</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