gm3p/CMakeLists.txt

31 lines
713 B
CMake
Raw Normal View History

2020-07-18 19:06:17 +00:00
cmake_minimum_required (VERSION 3.8)
2020-07-17 14:34:06 +00:00
2020-07-18 19:06:17 +00:00
project ("GM3p")
set(GMP_INCLUDE_DIR "" CACHE PATH "Path to the directory containing 'gmp.h'")
if(CMAKE_BUILD_TYPE EQUAL "DEBUG")
set(GMP_LIBRARY "" CACHE FILEPATH "Path to the gmp library")
else(CMAKE_BUILD_TYPE EQUAL "RELEASE")
set(GMP_LIBRARY "" CACHE FILEPATH "Path to the gmpDebug library")
endif()
set(ENABLE_TEST_PROJ FALSE CACHE BOOL "Enable the testing project (usually not needed)")
add_library(gm3p STATIC
"include/gm3p_int.hpp" "src/gm3p_int.cpp"
)
target_include_directories(gm3p PUBLIC
include
${GMP_INCLUDE_DIR}
)
target_link_libraries(gm3p PUBLIC
${GMP_LIBRARY}
)
2020-07-17 14:34:06 +00:00
# Include sub-projects.
2020-07-18 19:06:17 +00:00
if(ENABLE_TEST_PROJ)
add_subdirectory(testapp)
endif()