Skip to content

Commit

Permalink
Added CMakeLists.txt to hopsandcp
Browse files Browse the repository at this point in the history
  • Loading branch information
robbr48 committed Oct 16, 2024
1 parent 4708b54 commit 03cd115
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enable_testing()
add_subdirectory(doc)
add_subdirectory(HopsanCore)
add_subdirectory(componentLibraries)
add_subdirectory(hopsandcp)
add_subdirectory(HopsanCLI)
add_subdirectory(HopsanGUI)
add_subdirectory(HopsanGenerator)
Expand Down
21 changes: 21 additions & 0 deletions hopsandcp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.1)
project(hopsandcp)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_DEBUG_POSTFIX _d)
if(WIN32)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
endif()

set(CMAKE_AUTOMOC ON)

# Find source code
file(GLOB_RECURSE srcfiles src/*.cpp)
file(GLOB_RECURSE headerfiles include/*.h include/*.hpp)

# Create library target and add source code files
add_library(hopsandcp STATIC ${srcfiles} ${headerfiles})

# Set include directories
target_include_directories(hopsandcp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

0 comments on commit 03cd115

Please sign in to comment.