-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
34 lines (26 loc) · 1.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
project(CASCEXTRACTOR)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CASCEXTRACTOR_BINARY_DIR}/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CASCEXTRACTOR_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CASCEXTRACTOR_BINARY_DIR}/bin")
if (NOT EXISTS "${CASCEXTRACTOR_SOURCE_DIR}/CascLib/CMakeLists.txt")
message(FATAL_ERROR
"Missing dependency: CascLib
CASCExtractor requires the CascLib library.
It is provided as a GIT submodule of this repository.
Did you forgot to execute the following commands?
git submodule init
git submodule update")
endif()
add_subdirectory(CascLib)
include_directories("${CASCEXTRACTOR_SOURCE_DIR}/CascLib/src/"
"${CASCEXTRACTOR_SOURCE_DIR}/include/"
)
add_executable(CASCExtractor main.cpp)
target_link_libraries(CASCExtractor casc)
# Set the RPATH
if (APPLE)
set_target_properties(CASCExtractor PROPERTIES LINK_FLAGS "-Wl,-rpath,@loader_path/.")
elseif (UNIX)
set_target_properties(CASCExtractor PROPERTIES INSTALL_RPATH ".")
endif()