summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-30 17:22:02 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-10-30 17:22:34 +0100
commit2af0ddbcf5cf32e4f6e8e1e3993a1aca0c409c90 (patch)
treeb32c4bfbfdeafcdcad72e383edbb04b8f8ada797 /CMakeLists.txt
parentea2660dd167a853e704f167410037da162eccc6f (diff)
add initial, untested opentrack-api.dll
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 18 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a4daad1..0eb1b3c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-add_definitions(-DOPENTRACK_API)
+add_definitions(-DOPENTRACK_API -DIN_OPENTRACK)
if(MSVC)
add_definitions(-DNOMINMAX)
@@ -154,6 +154,9 @@ else()
endif()
# main app
+file(GLOB opentrack-lib-c "opentrack-api/*.cpp")
+file(GLOB opentrack-lib-h "opentrack-api/*.h")
+
file(GLOB opentrack-bin-c "facetracknoir/*.cpp" "facetracknoir/*.rc")
file(GLOB opentrack-bin-h "facetracknoir/*.h")
file(GLOB opentrack-bin-ui "facetracknoir/*.ui")
@@ -608,6 +611,12 @@ add_executable(opentrack ${opentrack-win32-executable} ${opentrack-bin-c} ${open
set_target_properties(opentrack PROPERTIES COMPILE_DEFINITIONS OPENTRACK_VERSION=\"${OPENTRACK__COMMIT}\")
set(OPENTRACK_COMMIT_VERSION \"${OPENTRACK__COMMIT}\")
configure_file("${CMAKE_SOURCE_DIR}/opentrack-version.h" "${CMAKE_BINARY_DIR}/opentrack-version.h" @ONLY NEWLINE_STYLE UNIX)
+
+add_library(opentrack-api ${opentrack-lib-c} ${opentrack-lib-h} ${opentrack-lib-moc})
+target_link_libraries(opentrack-api ${MY_QT_LIBS})
+
+set_target_properties(opentrack PROPERTIES COMPILE_DEFINITIONS OPENTRACK_VERSION=\"${OPENTRACK__COMMIT}\")
+
if(UNIX)
target_link_libraries(opentrack opentrack-qxt-mini)
endif()
@@ -631,15 +640,16 @@ endif()
target_link_libraries(opentrack opentrack-pose-widget opentrack-spline-widget ${MY_QT_LIBS} ${QXT_QXTCORE_LIB_RELEASE} ${QXT_QXTWIDGETS_LIB_RELEASE})
if(NOT WIN32)
target_link_libraries(opentrack dl)
+ target_link_libraries(opentrack-api dl)
endif()
- if(SDK_GOOGLE_BREAKPAD)
- if(MSVC)
- target_link_libraries(opentrack
- "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/crash_generation_client.lib"
- "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/exception_handler.lib"
- "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/common.lib")
- endif()
+if(SDK_GOOGLE_BREAKPAD)
+ if(MSVC)
+ target_link_libraries(opentrack
+ "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/crash_generation_client.lib"
+ "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/exception_handler.lib"
+ "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/common.lib")
endif()
+endif()
set_target_properties(opentrack PROPERTIES COMPILE_FLAGS -DOPENTRACK_MAIN)
# make install