aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-20 15:01:32 -0200
committerHugo Lima <hugo.lima@openbossa.org>2009-11-20 15:01:32 -0200
commite19c8f718dea4b644332188505a4cf38997302de (patch)
treeb861c51bb8551d0b4adb6280eaefed4d6990d3b0 /CMakeLists.txt
parenta7fdd58a4312b60d2bc2aeaf49216b74c4237e65 (diff)
Fix install command, so it works on windows.
When compiling with msvc, use msvc specific flags, not the gcc ones.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f71fd933..8715e3a97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,11 @@ find_package(Qt4 4.5.0 REQUIRED)
find_package(LibXml2 2.6.32 REQUIRED)
find_package(LibXslt 1.1.19 REQUIRED)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -DAPIEXTRACTOR_ENABLE_DUPLICATE_ENUM_VALUES -DAPIEXTRACTOR_BUILD -fvisibility=hidden")
+if (MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /GS- /GR- /DAPIEXTRACTOR_ENABLE_DUPLICATE_ENUM_VALUES /DAPIEXTRACTOR_BUILD")
+else (MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -DAPIEXTRACTOR_ENABLE_DUPLICATE_ENUM_VALUES -fvisibility=hidden")
+endif(MSVC)
set(apiextractor_MAJOR_VERSION 0)
set(apiextractor_MINOR_VERSION 3)
@@ -105,7 +109,9 @@ enable_testing()
add_subdirectory(tests)
install(FILES ${root_HEADERS} DESTINATION include/apiextractor)
-install(TARGETS apiextractor LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+install(TARGETS apiextractor LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ RUNTIME DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindApiExtractor.cmake
DESTINATION share/cmake-2.6/Modules)