Commit 217854d400ecb4507be7ac5e441be6799f724c05
1 parent
a6b8531d
Create library as a static lib
Showing
2 changed files
with
4 additions
and
15 deletions
CMakeLists.txt
| @@ -5,6 +5,7 @@ include(projectheader) | @@ -5,6 +5,7 @@ include(projectheader) | ||
| 5 | project_header(datatypes) | 5 | project_header(datatypes) |
| 6 | 6 | ||
| 7 | set(REPOSITORY_PACKAGE_NAME ${PROJECT_NAME} CACHE STRING "Repository name for ${PROJECT_NAME}" FORCE) | 7 | set(REPOSITORY_PACKAGE_NAME ${PROJECT_NAME} CACHE STRING "Repository name for ${PROJECT_NAME}" FORCE) |
| 8 | +set(BUILD_STATIC "ON") | ||
| 8 | add_subdirectory(src) | 9 | add_subdirectory(src) |
| 9 | 10 | ||
| 10 | # Test applications for each component. | 11 | # Test applications for each component. |
src/CMakeLists.txt
| @@ -3,30 +3,18 @@ LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake) | @@ -3,30 +3,18 @@ LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake) | ||
| 3 | include(projectheader) | 3 | include(projectheader) |
| 4 | project_header(datatypes) | 4 | project_header(datatypes) |
| 5 | 5 | ||
| 6 | -find_package( Qt5Core REQUIRED ) | ||
| 7 | -find_package( Qt5Sql REQUIRED ) | 6 | +set(BUILD_AS_STATIC "ON") |
| 8 | 7 | ||
| 9 | -include(artifacts) | ||
| 10 | - | ||
| 11 | -#include_directories( SYSTEM | ||
| 12 | -# ${Qt5Core_INCLUDE_DIRS} | ||
| 13 | -# ${Qt5Sql_INCLUDE_DIRS} | ||
| 14 | -#) | 8 | +include_directories( SYSTEM |
| 9 | +) | ||
| 15 | 10 | ||
| 16 | include(compiler) | 11 | include(compiler) |
| 17 | 12 | ||
| 18 | -#include_directories( | ||
| 19 | -#) | ||
| 20 | - | ||
| 21 | set(SRC_LIST | 13 | set(SRC_LIST |
| 22 | ${CMAKE_CURRENT_SOURCE_DIR}/Variant.h | 14 | ${CMAKE_CURRENT_SOURCE_DIR}/Variant.h |
| 23 | ${CMAKE_CURRENT_SOURCE_DIR}/Variant.cpp | 15 | ${CMAKE_CURRENT_SOURCE_DIR}/Variant.cpp |
| 24 | ) | 16 | ) |
| 25 | 17 | ||
| 26 | -#link_directories( | ||
| 27 | -# ${CMAKE_BINARY_DIR}/lib | ||
| 28 | -#) | ||
| 29 | - | ||
| 30 | include(library) | 18 | include(library) |
| 31 | add_libraries( | 19 | add_libraries( |
| 32 | ) | 20 | ) |