aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorrenato araujo oliveira <renato@renato-note.(none)>2009-11-24 11:46:18 -0300
committerrenato araujo oliveira <renato@renato-note.(none)>2009-11-24 11:46:18 -0300
commitb2519fa1f17be24956772f5a5101a914cbbdb77d (patch)
treed14317a5420c9836afea23c3eb775fa6306526de /CMakeLists.txt
parent9a434d34ee73e69db79fa1bba0c9443404653546 (diff)
parent302029e093c88fb46cea8d6131726b82731110f9 (diff)
Merge commit 'mainline/master'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48de3d33..ef6cdbb5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,12 @@ cmake_minimum_required(VERSION 2.6)
find_package(Qt4 4.5.0 REQUIRED)
find_package(ApiExtractor REQUIRED)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -DGENRUNNER_BUILD -fvisibility=hidden")
+if (MSVC)
+ set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /w /EHsc- /GS- /GR- /DGENRUNNER_BUILD -D_SCL_SECURE_NO_WARNINGS")
+else (MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden")
+endif(MSVC)
+
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
@@ -62,14 +67,16 @@ add_custom_target(dist
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-install(TARGETS genrunner DESTINATION ${LIB_INSTALL_DIR})
+install(TARGETS genrunner LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ RUNTIME DESTINATION bin)
install(TARGETS generatorrunner DESTINATION bin)
install(FILES generator.h DESTINATION include/generatorrunner)
install(FILES generatorrunnermacros.h DESTINATION include/generatorrunner)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/generatorrunner.pc DESTINATION
${LIB_INSTALL_DIR}/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindGeneratorRunner.cmake
- DESTINATION share/cmake-2.6/Modules)
+ DESTINATION "share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules")
#FIXME: manpages should be installed only on Linux targets
file(GLOB manpages ${CMAKE_CURRENT_SOURCE_DIR}/*.1)