summaryrefslogtreecommitdiffhomepage
path: root/ArchiveEx
diff options
context:
space:
mode:
Diffstat (limited to 'ArchiveEx')
-rw-r--r--ArchiveEx/CMakeLists.txt42
1 files changed, 12 insertions, 30 deletions
diff --git a/ArchiveEx/CMakeLists.txt b/ArchiveEx/CMakeLists.txt
index 99ea254..faaedda 100644
--- a/ArchiveEx/CMakeLists.txt
+++ b/ArchiveEx/CMakeLists.txt
@@ -1,33 +1,15 @@
project(ArchiveEx)
-add_library(
- ArchiveEx
- Archive.cpp
- )
-target_include_directories(
- ArchiveEx
- PUBLIC .
- )
-target_link_libraries(
- ArchiveEx
- PRIVATE Zlib::zlib
- )
-add_executable(
- dat
- dat.cpp
- )
-target_link_libraries(
- dat
- PRIVATE ArchiveEx
- )
+
+
+add_library(${PROJECT_NAME} SHARED Archive.cpp)
+target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+target_link_libraries(${PROJECT_NAME} PRIVATE Zlib::zlibstatic)
+install(TARGETS ${PROJECT_NAME} RUNTIME COMPONENT Runtime DESTINATION ${CMAKE_INSTALL_PREFIX})
+
+
+add_executable(dat dat.cpp)
+target_link_libraries(dat PRIVATE ${PROJECT_NAME})
if(WIN32)
- target_link_libraries(
- dat
- PRIVATE -l:libshlwapi.a
- )
+ target_link_libraries(dat PRIVATE -lshlwapi)
endif()
-install(
- TARGETS dat
- RUNTIME
- COMPONENT Runtime
- DESTINATION ${CMAKE_INSTALL_PREFIX}
- )
+install(TARGETS dat RUNTIME COMPONENT Tools DESTINATION ${CMAKE_INSTALL_PREFIX})