File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ option(CODETEMPLATE_WITH_TESTS "Compile test projects" OFF)
1010
1111# package settings
1212include (CMakePackageConfigHelpers )
13- configure_package_config_file (cmake/CodeTemplateConfig.cmake.in CodeTemplateConfig.cmake INSTALL_DESTINATION ${ PROJECT_BINARY_DIR } )
14- install (FILES ${PROJECT_BINARY_DIR } /CodeTemplateConfig.cmake DESTINATION ${ PROJECT_BINARY_DIR } / install/cmake/)
13+ configure_package_config_file (cmake/CodeTemplateConfig.cmake.in CodeTemplateConfig.cmake INSTALL_DESTINATION install /cmake/ )
14+ install (FILES ${PROJECT_BINARY_DIR } /CodeTemplateConfig.cmake DESTINATION install/cmake/)
1515
1616#about libraries
1717add_subdirectory (src/code_template )
Original file line number Diff line number Diff line change 11
22set (target_name code_template)
3- add_library (${target_name} STATIC "" ) # try SHARED for dynamic library
4-
3+ add_library (${target_name} STATIC "" )
4+ # try SHARED for dynamic library
5+ # Windows: use dll export macro to use functions and class out of the library
56target_sources (${target_name}
67 PRIVATE
78 "${PROJECT_SOURCE_DIR } /src/code_template/print_log.cpp"
@@ -20,13 +21,13 @@ export(TARGETS ${target_name}
2021)
2122
2223#install target
23- install (TARGETS ${target_name} EXPORT ${target_name} DESTINATION ${ PROJECT_BINARY_DIR } / install/lib)
24+ install (TARGETS ${target_name} EXPORT ${target_name} DESTINATION install/lib)
2425#install export
25- install (EXPORT ${target_name} FILE ${target_name} _target.cmake DESTINATION ${ PROJECT_BINARY_DIR } / install/cmake/)
26+ install (EXPORT ${target_name} FILE ${target_name} _target.cmake DESTINATION install/cmake/)
2627
2728#install includes
2829install (DIRECTORY ${PROJECT_SOURCE_DIR } /include/
29- DESTINATION ${ PROJECT_BINARY_DIR } / install/include/
30+ DESTINATION install/include/
3031)
3132
3233
You can’t perform that action at this time.
0 commit comments