Salome HOME
CMake: simplifying Python detection mechanism.
[samples/pylight.git] / CMakeLists.txt
index 2d64182a422166c31c83591460c042eefd53a586..4717add04f45729ad8a4a1f207ec7135875d876d 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2015  OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -28,7 +28,7 @@ CMAKE_POLICY(SET CMP0003 NEW)
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
@@ -54,15 +54,19 @@ SET(BUILD_SHARED_LIBS TRUE)
 LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 
 # User options
-# (some options have already been defined in KERNEL) 
 # ============
-# OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) #For use in the future
+OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
 # OPTION(SALOME_BUILD_DOC "Generate SALOME PYLIGHT documentation" ON) #For use in the future
 
+IF(SALOME_BUILD_TESTS)
+  ENABLE_TESTING()
+ENDIF()
+
 ##
 ## From KERNEL:
 ##
-FIND_PACKAGE(SalomePython REQUIRED)
+FIND_PACKAGE(SalomePythonInterp REQUIRED)
+FIND_PACKAGE(SalomePythonLibs REQUIRED)
 
 # Find GUI
 # ===========