2020-10-09 19:13:42 +01:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2021-01-12 12:52:26 +00:00
|
|
|
set(SOURCE_FILES
|
2021-01-20 18:17:34 +00:00
|
|
|
commonframe.cpp
|
2020-12-27 20:25:42 +00:00
|
|
|
fileregistry.cpp
|
2020-12-28 11:35:58 +00:00
|
|
|
ptreeregistry.cpp
|
2020-10-09 19:13:42 +01:00
|
|
|
programoptions.cpp
|
|
|
|
utils.cpp
|
2020-11-13 15:37:10 +00:00
|
|
|
timer.cpp
|
2020-11-20 15:32:35 +00:00
|
|
|
speed.cpp
|
2020-10-09 19:13:42 +01:00
|
|
|
)
|
|
|
|
|
2021-01-12 12:52:26 +00:00
|
|
|
set(HEADER_FILES
|
2021-01-20 18:17:34 +00:00
|
|
|
commonframe.h
|
2021-01-12 12:52:26 +00:00
|
|
|
fileregistry.h
|
|
|
|
ptreeregistry.h
|
|
|
|
programoptions.h
|
|
|
|
utils.h
|
|
|
|
timer.h
|
|
|
|
speed.h
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(common2 STATIC
|
|
|
|
${SOURCE_FILES}
|
|
|
|
${HEADER_FILES}
|
|
|
|
)
|
|
|
|
|
2020-10-09 19:13:42 +01:00
|
|
|
find_package(Boost REQUIRED
|
|
|
|
COMPONENTS program_options
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(common2 PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${Boost_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2021-10-17 09:21:54 +01:00
|
|
|
target_link_libraries(common2 PRIVATE
|
2020-10-09 19:13:42 +01:00
|
|
|
Boost::program_options
|
2021-10-17 09:21:54 +01:00
|
|
|
appleii
|
2021-11-28 18:49:17 +00:00
|
|
|
windows
|
2020-10-09 19:13:42 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(RELATIVE_PATH ROOT_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
2021-02-04 10:12:51 +00:00
|
|
|
if ("${ROOT_PATH}" STREQUAL "")
|
2021-02-03 18:34:53 +00:00
|
|
|
# if the 2 paths are the same
|
|
|
|
set(ROOT_PATH "./")
|
|
|
|
endif()
|
2020-10-09 19:13:42 +01:00
|
|
|
file(RELATIVE_PATH SHARE_PATH ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DATADIR}/applewin)
|
|
|
|
|
|
|
|
configure_file(config.h.in config.h)
|
|
|
|
|
|
|
|
install(DIRECTORY ${CMAKE_SOURCE_DIR}/resource
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/applewin)
|